/*
  mySerial1.h - Hardware serial library for Wiring
  Modified from Code written by Nicholas Zambetti and David A. Mellis

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#ifndef mySerial1_h
#define mySerial1_h

#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include "BetterStream.h"

struct ring_buffer;

class mySerial1 : public BetterStream
{
  public:
    mySerial1();
    void begin(long BAUD1);
    void end();
    int available(void);
    int read(void);
    void flush(void);
	uint8_t datareceived(void);
    virtual void write(uint8_t);
    using BetterStream::write; // pull in write(str) and write(buf, size) from Print
};

//extern mySerial1 Serial1;

#endif
